def quick_sort(arr, l, r):
    if l>=r:
        return
    i=l
    j=r
    x=arr[(i+j)//2]
    while i<j:
        while arr[i]<x:
            i+=1
        while arr[j]>x:
            j-=1
        if i<j:
            arr[i],arr[j]=arr[j],arr[i]
            i+=1
            j-=1
    quick_sort(arr,l,j)
    quick_sort(arr,j+1,r)

# 🎉 示例
if __name__ == "__main__":
    sample = [1,1,1,1,1,1,1,1,1]
    quick_sort(sample, 0, len(sample) - 1)
    print("喵呜~快速排序结果:", sample)
